upload(url){
    return new Promise((resolve, reject) => {
        
        let a = uni.uploadFile({
            url: 'https://mzzy.ydlweb.com/upload/img/upload', // 仅为示例，非真实的接口地址
            filePath: url,
            name: 'file',
            header: {
                "Content-Type": "multipart/form-data"
            },
            formData: {
                user: this.form.phone,
                module: 'images',
                type: '1'
            },
            success: (res) => {
                setTimeout(() => {
                    resolve(res)
                }, 1000)
            }
        });
    })
},
afterRead(e) {

    if (this.fileList1.length >= 3) return uni.showToast({
        icon: 'error',
        title: '图片最多3张'
    })
    this.upload(e.file.url).then(res=>{
        if(res.statusCode==200){
            uni.$u.toast('上传成功')
            this.fileList1.push(e.file)
        }else{
            uni.$u.toast('上传失败')
        }
    })
},
